﻿using iTool.ValidationExtend;
using System;
using System.ComponentModel.DataAnnotations;

namespace HandlerContextOptions
{
    public class CreateGatewayDateBaseRequset
    {
        [Required]
        [Password]
        public string AdministratorPassward { get; set; }
        [Required]
        public string Administrator { get; set; } = "Administrator";
        [Required]
        [EmailAddress]
        public string Email { get; set; }
        [Required]
        [Password]
        public string Passward { get; set; }
        [Required]
        [Range(1000, 65535)]
        public int Port { get; set; } = 2533;

        public string Seed { get; set; }

        public string SqlConnection { get { return $"Data Source=127.0.0.1,{this.Port};database=iTool.Gateway;uid=sa;pwd={this.Passward};MultipleActiveResultSets=true;"; } }
    }


    public class CreateGatewayDateBaseResult : ResultBasics
    {
    }
}
